package com.lantosec.hmrp.modules.category.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.lantosec.hmrp.modules.category.entity.AssetsAccess;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 资产门禁设备 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="AssetsAccess对象", description="资产门禁设备")
public class AssetsAccessVO extends BaseVO<AssetsAccess> {
    private static final long serialVersionUID = 1L;


    public AssetsAccessVO(AssetsAccess entity){
        this.accessId = entity.getAccessId();
        this.accessName = entity.getAccessName();
        this.listenerPort = entity.getListenerPort();
        this.warnInterval = entity.getWarnInterval();
        this.flag = entity.getFlag();
    }

    @Override
    public AssetsAccess convertToEntity(){
        return new AssetsAccess(this);
    }


    @ApiModelProperty(value = "门禁设备ID")
    private String accessId;

    @ApiModelProperty(value = "门禁设备名称")
    private String accessName;

    @ApiModelProperty(value = "监听端口")
    private Integer listenerPort;

    @ApiModelProperty(value = "预警间隔时间(分钟)")
    private Integer warnInterval;

    @TableField(exist = false)
    private Integer flag;


}
